<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <input class="score" type="text">
    <button class="search">查看分数是否合格</button>
    <script>
        var score=document.getElementsByClassName("score")[0];
        var search=document.getElementsByClassName("search")[0];
        search.onclick=function(){
            var yourscore=score.value;
            if(yourscore>0&&yourscore<60){
                alert("不及格")
            }else if(yourscore>=60&&yourscore<=80){
                alert("良好")
            }else if(yourscore>80&&yourscore<90){
                alert("优秀")
            }else if(yourscore>=90&&yourscore<=100){
                alert("天才")
            }else{
                alert("输入错误，请输入1~100数值")
            }
        }
    </script>
</body>
</html>